cmake_minimum_required(VERSION 3.18)

# set the project name and version
project(TestMyMath
    LANGUAGES CXX
)

# 启用测试支持
include(CTest)

# 添加测试可执行文件
add_executable(main main.cpp)

# 查找MyMath 库
find_package(MyMath CONFIG REQUIRED)

# 链接被测库
target_link_libraries(main PRIVATE MyMath::MyMath)

# 将测试添加到 CTest
add_test(
    NAME TestMyMath
    COMMAND main
)
